import socket, struct

def parse_ip_file(name):
    res = []
    with open(name) as ip_file:
        for line in ip_file.readlines():
            line = line.strip()
            fr, to = line.split("-")
            res.append((fr, to))
    
    return res


def parse_ips_from_range(start, end):
    start = struct.unpack('>I', socket.inet_aton(start))[0]
    end = struct.unpack('>I', socket.inet_aton(end))[0]
    return [socket.inet_ntoa(struct.pack('>I', i)) for i in range(start, end)]